/*
* 1videoConference -- An open source video conferencing platform.
*
* Copyright (C) 2007 - 2008, Adiance Technologies Pvt. Ltd.
*
* Hardik Sanghvi <hardik.sanghvi @adiance.com>
*
* See http://www.1videoconference.org for more information about
* the 1videoConference project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, forums and mailing lists
* for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/

using System;
using System.ServiceModel;
using System.Collections.Generic;
//using Adiance.VMukti.BAL;

namespace Adiance.VMukti.BAL
{
    [ServiceContract(CallbackContract = typeof(IsvcUriInfo))]
    public interface IsvcUriInfo
    {
        [OperationContract(IsOneWay = true)]
        void svcJoin();

        [OperationContract(IsOneWay = true)]
        void svcGetDbCred(string uname);

        [OperationContract(IsOneWay = true)]
        void svcSetDbCred(string uname, string[] cred);

        [OperationContract(IsOneWay = true)]
        void svcGetUri(string uname, string meetingid);

        [OperationContract(IsOneWay = true)]
        void svcSetUri(string uname, string[] uri);

        [OperationContract(IsOneWay = true)]
        void svcUnJoin();



        //[OperationContract]
        //string GetUri(string controlname, string servicename,string meetingid);

        //[OperationContract]
        //string[] GetDatabaseCred();

    }

    public interface IsvcUriInfoChannel : IsvcUriInfo, IClientChannel
    {

    }

    public class svcUriInfo : IsvcUriInfo
    {
        public delegate void DelsvcJoin();
        public delegate void DelsvcGetDbCred(string uname);
        public delegate void DelsvcSetDbCred(string uname, string[] cred);
        public delegate void DelsvcGetUri(string uname, string meetingid);
        public delegate void DelsvcSetUri(string uname, string[] uri);
        public delegate void DelsvcUnJoin();

        public event DelsvcJoin EntsvcJoin;
        public event DelsvcGetDbCred EntsvcGetDbCred;
        public event DelsvcSetDbCred EntsvcSetDbCred;
        public event DelsvcGetUri EntsvcGetUri;
        public event DelsvcSetUri EntsvcSetUri;
        public event DelsvcUnJoin EntsvcUnJoin;


        public void svcJoin()
        {
            EntsvcJoin();
        }

        public void svcGetDbCred(string uname)
        {
            EntsvcGetDbCred(uname);
        }


        public void svcSetDbCred(string uname, string[] cred)
        {
            EntsvcSetDbCred(uname, cred);
        }

        public void svcGetUri(string uname, string meetingid)
        {
            EntsvcGetUri(uname, meetingid);
        }

        public void svcSetUri(string uname, string[] uri)
        {
            EntsvcSetUri(uname, uri);
        }

        public void svcUnJoin()
        {
            EntsvcUnJoin();
        }
    }   
}

